package com.ophiux.rocket.consumer;

import com.ophiux.rocket.channel.MyChannel;
import com.ophiux.rocket.dto.UserEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

@Slf4j
//@EnableBinding(Sink.class)
@EnableBinding(MyChannel.class)
public class ReceiveMQ {

    @StreamListener(MyChannel.INPUT)
    public void receive(UserEntity entity) {
        log.info("收到消费消息:{}", entity.toString());
    }
}
